/**
 * Created by zhengsenwen on 2017/8/24.
 */

loadToday();

/**
 * 加载今天是哪一天  例如：2017-08-24 星期四
 */
function loadToday() {
    setTimeout(function () {
        $.ajax({
            type: 'get',
            url: '/common/today',
            async: true,
            data: new Date(),
            contentType: 'application/json;charset=utf-8',
            timeout: 10000,
            success: function (data) {
                $(".header_box #header_today").text(data);
            },
            error: function () {
                alert("失败，请稍后再试！");
            }
        });
    }, 500);


    setTimeout(function () {
        $.ajax({
            type: 'get',
            url: '/common/today',
            async: true,
            data: new Date(),
            contentType: 'application/json;charset=utf-8',
            timeout: 10000,
            beforeSend: function () {
                $(".header_box #header_today").text("");
            },
            success: function (data) {
                $(".header_box #header_today").text(data);
            },
            error: function () {
                alert("失败，请稍后再试！");
            }
        });
    }, 1000 * 60 * 60)



}